<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>退款审核</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../component/elementUI/index.css">
  <link rel="stylesheet" href="../../../style/index.css">
  <style>
    .title {
      font-size: 20px;
      font-weight: bold;
    }
  </style>
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :inline="true" :form="form">
      <!-- <el-form-item>
        <el-button type="danger">批量删除</el-button>
      </el-form-item>
      <el-form-item>
        <el-input v-model="form.serachKey" placeholder="请输入内容" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSerach">查询</el-button>
      </el-form-item> -->
    </el-form>

    <el-table :data="tableData" stripe border
      height="calc(100vh - 140px)" @selection-change="handleSelectionChange" style="width: 100%">
      <el-table-column type="selection" width="40"></el-table-column>
      <el-table-column label="序号" width="50" type="index"></el-table-column>
      <el-table-column prop="Collection_SerialNumber" label="收款流水号"></el-table-column>
      <el-table-column prop="Article_Name" label="商品名称"></el-table-column>
      <el-table-column prop="Specifications_Name" label="规格"></el-table-column>
      <el-table-column prop="Sales_Contacts" label="消费顾客"></el-table-column>
      <el-table-column prop="Sales_Address" label="送货地址"></el-table-column>
      <el-table-column prop="Collection_Date" label="收款时间"></el-table-column>
      <el-table-column prop="Sales_Amount" label="订单金额"></el-table-column>
      <el-table-column prop="Delivery_Amount" label="配送金额"></el-table-column>
      <el-table-column prop="Collection_Amount" label="实收金额"></el-table-column>
      <el-table-column prop="Order_Type" label="订单类型">
        <template v-slot="{ row }">
          <el-tag v-if="row.Order_Type==1" size="small">客户下单</el-tag>
          <el-tag v-if="row.Order_Type==3" size="small">寄售下单</el-tag>
          <el-tag v-if="row.Order_Type==4" size="small">求购下单</el-tag>
          <el-tag v-if="row.Order_Type==5" size="small">经销商下单</el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="Row_Status" label="付款状态" width="90">
        <template v-slot="{ row }">
          <div v-if="row.Order_Type==1">
            <el-tag v-if="row.Row_Status==1" size="small">已付款</el-tag>
            <el-tag v-if="row.Row_Status==6" size="small">发货中</el-tag>
            <el-tag v-if="row.Row_Status==9" size="small">待发货</el-tag>
            <el-tag v-if="row.Row_Status==7" size="small">已送达</el-tag>
          </div>
          <div v-else-if="row.Order_Type==4||row.Order_Type==3">
            <el-tag v-if="row.Row_Status==1" size="small">已付款</el-tag>
            <el-tag v-if="row.Row_Status==2" size="small">退款审核</el-tag>
          </div>
          <div v-else-if="row.Order_Type==5">
            <el-tag v-if="row.Row_Status==1" size="small">已付款</el-tag>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="250">
        <template v-slot="{row}">
          <div v-if="row">
            <el-button type="primary" size="small" 
              @click="handleRefund(row)">通过</el-button>
            <!-- <el-button type="primary" size="small"
              v-if="JSON.parse(sessionStorage.getItem('RoleArr')).some(item=>item=='B0012')"
              @click="isRefund(row.Sales_Order_SerialNumber,row.Order_Type)">通过</el-button>
            <el-button type="danger" size="small"
              v-if="JSON.parse(sessionStorage.getItem('RoleArr')).some(item=>item=='B0013')"
              @click="isNorefund(row.Sales_Order_SerialNumber,row.Order_Type)">拒绝</el-button> -->
            <!-- <el-button type="success" size="small" @click="showMember(row.Sales_Order_SerialNumber)">查看</el-button> -->
          </div>
        </template>
      </el-table-column>
    </el-table>

    <el-pagination style="position: fixed;bottom: 0;" background v-show="total > 0" @size-change="handleSizeChange"
      @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10,50,100,500,1000]"
      :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
    </el-pagination>

    <!-- 对话框 -->
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" center>
      <div>
        <div class="title">请确认是否退款</div>
        <!-- <div>
          <el-checkbox v-model="checked">点击包含配送费</el-checkbox>
        </div> -->
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirm_methods">确 定</el-button>
      </span>
    </el-dialog>
  </div>
  <script type="text/javascript" src="../../../utils/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../utils/vue.min.js"></script>
  <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
  <script type="text/javascript" src="../../../utils/utils.js"></script>
  <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
  <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
  <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
  <script type="text/javascript" src="./js/RefundReview.js"></script>
</body>

</html>